package com.example.mybatisplus.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * Created with IntelliJ IDEA.
 * User: lixiao
 * Created Date: 2020/9/24 16:28
 */
@Controller
@RequestMapping("/htmltest")
public class LoginController {


    @RequestMapping("/sayHello")
    public String sayHello() {
        System.out.println("+++++++++++++++++++++++++++++++++");
        return "index.html";
    }

    @RequestMapping("/login")
    public String login(HttpServletRequest request) {
        System.out.println("loginloginloginloginloginloginloginlogin");
        request.getSession().setAttribute("login","true");
        return "login.html";
    }

    @RequestMapping("/error")
    public String error(HttpServletRequest request) {
        System.out.println("errorerrorerrorerrorerrorerrorerrorerror");
        return "error.html";
    }
}